home *** CD-ROM | disk | FTP | other *** search
-
-
-
- SIGNAL C Library Procedures SIGNAL
-
-
-
- NNAAMMEE
- signal - simplified software signal facilities
-
- SSYYNNOOPPSSIISS
- ##iinncclluuddee <<ssiiggnnaall..hh>>
-
- ((**ssiiggnnaall((ssiigg,, ffuunncc))))(())
- iinntt ((**ffuunncc))(());;
-
- DDEESSCCRRIIPPTTIIOONN
- _S_i_g_n_a_l is a simplified interface to the more general
- _s_i_g_v_e_c(2) facility. See the _s_i_g_v_e_c(_2) manual entry for com-
- plete details on how signals are handled.
-
- If _f_u_n_c is SIG_DFL, the default action for signal _s_i_g is
- reinstated. If _f_u_n_c is SIG_IGN the signal is subsequently
- ignored and pending instances of the signal are discarded.
- Otherwise, when the signal occurs further occurrences of the
- signal are automatically blocked and _f_u_n_c is called.
-
- A return from the function unblocks the handled signal and
- continues the process at the point it was interrupted.
- UUnnlliikkee pprreevviioouuss ssiiggnnaall ffaacciilliittiieess,, tthhee hhaannddlleerr _f_u_n_c rreemmaaiinnss
- iinnssttaalllleedd aafftteerr aa ssiiggnnaall hhaass bbeeeenn ddeelliivveerreedd..
-
- If a caught signal occurs during certain system calls, caus-
- ing the call to terminate prematurely, the call is automati-
- cally restarted. In particular this can occur during a _r_e_a_d
- or _w_r_i_t_e(2) on a slow device (such as a terminal; but not a
- file) and during a _w_a_i_t(2).
-
- The value of _s_i_g_n_a_l is the previous (or initial) value of
- _f_u_n_c for the particular signal.
-
- After a _f_o_r_k(2) or _v_f_o_r_k(2) the child inherits all signals.
- _E_x_e_c_v_e(2) resets all caught signals to the default action;
- ignored signals remain ignored.
-
- RREETTUURRNN VVAALLUUEE
- The previous action is returned on a successful call. Oth-
- erwise, -1 is returned and _e_r_r_n_o is set to indicate the
- error.
-
- EERRRROORRSS
- _S_i_g_n_a_l will fail and no action will take place if one of the
- following occur:
-
- [EINVAL] _S_i_g is not a valid signal number.
-
- [EINVAL] An attempt is made to ignore or supply a
- handler for SIGKILL or SIGSTOP.
-
-
-
-
- Sprite v1.0 May 20, 1986 1
-
-
-
-
-
-
- SIGNAL C Library Procedures SIGNAL
-
-
-
- [EINVAL] An attempt is made to ignore SIGCONT (by
- default SIGCONT is ignored).
-
- SSEEEE AALLSSOO
- kill(1), ptrace(2), kill(2), sigvec(2), sigblock(2), sigset-
- mask(2), sigpause(2), sigstack(2), setjmp(3), tty(4)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Sprite v1.0 May 20, 1986 2
-
-
-
-